<?php
// +----------------------------------------------------------------------
// | 海豚PHP框架 [ DolphinPHP ]
// +----------------------------------------------------------------------
// | 版权所有 2016~2019 广东卓锐软件有限公司 [ http://www.zrthink.com ]
// +----------------------------------------------------------------------
// | 官方网站: http://dolphinphp.com
// +----------------------------------------------------------------------

namespace app\index\controller;

use app\yperp\common\yp\YpOrder;
use app\yperp\logic\Standby;

/**
 * 前台首页控制器
 * @package app\index\controller
 */
class Index extends Home
{
    public function test()
    {
        $json = '{"userId":3748719,"token":"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiIiLCJhdWQiOiIiLCJqdGkiOiIzNzQ4NzE5IiwiaWF0IjoxNzE4NzA2ODA5LCJuYmYiOjE3MTg3MDY4MDksImV4cCI6MTcyMTI5ODgwOSwidHlwZSI6InYxMWFwcCJ9.zXVc1iJReGwrwreDGoNp80m8D3LBkqrZ83HsZzDZCa0","isFirst":false}';
        $json = json_decode($json, true);
        return json($json);
    }
    public function index()
    {

        // dump(get_thumb(323));
        // dump(get_file_path(323));
        // dump(get_file_path(323));
        $list_img = '240,241,242,243,244';
        $list_img = is_array($list_img) ? $list_img : explode(',', $list_img);
        dump($list_img);
        die;

        // Standby::getInstance()->sku_remove([1]);
        // die;
        $res = YpOrder::getInstance()->getList();
        dump($res);
        die;

        return $this->redirect('/admin');
        return 'ThinkPHP';
        // 默认跳转模块
        if (config('home_default_module') != '' && config('home_default_module') != 'index') {
            $this->redirect(config('home_default_module') . '/index/index');
        }
        return '<style type="text/css">*{ padding: 0; margin: 0; } .think_default_text{ padding: 4px 48px;} a{color:#2E5CD5;cursor: pointer;text-decoration: none} a:hover{text-decoration:underline; } body{ background: #fff; font-family: "Century Gothic","Microsoft yahei"; color: #333;font-size:18px} h1{ font-size: 100px; font-weight: normal; margin-bottom: 12px; } p{ line-height: 1.6em; font-size: 42px }</style><div style="padding: 24px 48px;"> <h1>:)</h1><p> ' . config("dolphin.product_name") . ' ' . config("dolphin.product_version") . '<br/><span style="font-size:30px">极速 · 极简 · 极致</span></p></div>';
    }
}
